﻿using System;

namespace Mindfor.Web.Routing
{
	/// <summary>
	/// Sets main action for the MVC sub-action.
	/// </summary>
	[AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
	public class UrlSubActionAttribute : Attribute
	{
		/// <summary>
		/// Gets or sets main action name.
		/// </summary>
		public string MainAction { get; set; }

		/// <summary>
		/// Sets main action for the MVC sub-action.
		/// </summary>
		/// <param name="mainAction">Main action name.</param>
		public UrlSubActionAttribute(string mainAction)
		{
			MainAction = mainAction;
		}
	}
}
